package com.lancoo.ccas52.arrangecourse.rulecheck;

import com.lancoo.ccas52.arrangecourse.entities.ClassHour;
import com.lancoo.ccas52.arrangecourse.entities.TeachingClassUnit;
import com.lancoo.ccas52.arrangecourse.entities.TimeslotRoom;

import java.util.LinkedList;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * @Description 规则接口服务，使用装饰者模式进行封装
 * @Author Fortysun
 * @Date 2023/9/5 16:01
 **/
public interface RuleService {
    /**
     * 检测是否适合分配：
     * 判断待分配的教室课时分组，是否满足教学班设置的优先排规则
     * @param teachingClassUnit 教学班排课单元
     * @param continuousList 连上的教室课时分组信息列表
     * @param classHourMap 课表课时map
     * @return
     */
    Boolean isSuitable(TeachingClassUnit teachingClassUnit,
                       LinkedList<TimeslotRoom> continuousList,
                       ConcurrentHashMap<String, CopyOnWriteArrayList<ClassHour>> classHourMap);
}
